<?php
declare(strict_types=1);
namespace cms\sms\admin\api_controller;

use cms\sms\request\PlatformFormRequest;
use cms\sms\service\PlatformService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\PostMapping;

/**
 * Class PlatformController
 * @package cms\sms\admin\api_controller
 * @Controller(prefix="api/sms/admin_platform")
 */
class PlatformController extends CommonController
{
    /**
     * @Inject()
     * @var PlatformService
     */
    protected PlatformService $platformService;

    /**
     * @PostMapping(path="create")
     */
    public function create(PlatformFormRequest $request): ResponseInterface
    {
        $msg = $request->messages();
        echo '内容';
        var_dump($msg);
        $form_data = $request->validated();
        $result = $this->platformService->model->create($form_data);
        return $this->success('请求成功', $result);
    }

    public function retrieve(): ResponseInterface
    {

    }
}